<?php
namespace app\client\controller;

class NewsController extends \think\Controller {
  /**
   *  @brief  : 客户端每周封号
   *  @return : page
   *  @details: 
   */
  public function fengAction() {
    $monday = 0;
    $time = time();
    $wday = getdate($time)['wday']; // 0(表示星期天)到 6(表示星期六)
    if ($wday >= 1) { // 周一到周六  => 周一
      $monday = $time - ($wday - 1) * 24 * 60 * 60;
    } else { // 星期日 => 上周一
      $monday = $time - 6 * 24 * 60 * 60;
    }
    $list = db('', 'rydb.accounts')->query('SELECT a.GameID, a.UserID, a.NickName, b.HeadImgUrl FROM dbo.AccountsInfo AS a LEFT JOIN dbo.IndividualDatum AS b ON a.UserID = b.UserID WHERE a.UserID IN (6, 64, 66, 106, 3, 8, 10, 42)');
    $total = count($list);
    ////////////////////////////////////////////////////////////////////////////
    return $this->fetch('', [
      'list'  => $list,
      'total' => $total,
      'monday'=> $monday,
    ]);
  }
  /**
   *  @brief  : 网络游戏许可及服务协议
   *  @return : page
   *  @details: 
   */
  public function agreementAction(){
    return $this->fetch('', []);
  }
}
